package com.hzncc.flowable_diboot.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.diboot.core.entity.BaseModel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import jakarta.validation.constraints.NotNull;

/**
* 商机流程模板 Entity 定义
* @author MyName
* @version 1.0
* @date 2024-06-11
* Copyright © MyCorp
*/

@TableName("mdl_oppo_flow_template")
@Getter @Setter @Accessors(chain = true)
public class OppoFlowTemplate extends BaseModel {
    private static final long serialVersionUID = 1377422352032693645L;

    /**
     * 租户
     */
    @NotNull(message = "租户不能为空")
    @TableField()
    private String tenantId;

    /**
     * 模板编码
     */
    @Length(max=100, message="模板编码长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String code;

    /**
     * 模板名称
     */
    @Length(max=100, message="模板名称长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String name;

    /**
     * 默认模板
     */
    @TableField()
    private Boolean isDefault;

    /**
     * 状态 0 新建 1 启用 2 废弃
     */
    @TableField()
    private Integer status;

}